﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
    <style type="text/css">
        .parentRow {
            width: 500px;
            height: 16px;
            margin-right: 10px;
            margin-bottom: 25px;
        }

        .childColumn {
            float: left;
            margin-right: 5px;
        }
    </style>

</head>
<body>
    <!-- Modal -->
    <div class="modal-body">
        <div class="row">
            <p>
                <span class="a_tit lang" as="name"></span>
                <span><input type="text" id="txtActivityName" class="form-control" style="width:340px;" /></span>
            </p>
            <p>
                <span class="a_tit lang" as="code"></span>
                <span><input type="text" id="txtActivityCode" class="form-control" style="width:340px;" /></span>
            </p>
            <p>
                <span class="a_tit lang" as="description"></span>
                <span><input type="text" id="txtDescription" class="form-control" style="width:340px;" /></span>
            </p>
        </div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li class="hideme"><a href="#role" role="tab" data-toggle="tab" id="tabRole" class="lang" as="role"></a></li>
            <li class="hideme"><a href="#gateway" role="tab" data-toggle="tab" id="tabGateway" class="lang" as="gateway"></a></li>
            <li class="hideme"><a href="#sub" role="tab" data-toggle="tab" id="tabSub" class="lang" as="subprocess"></a></li>
            <li class="hideme"><a href="#page" role="tab" data-toggle="tab" id="tabPage" class="lang" as="page"></a></li>
            <li class="hideme"><a href="#myProperties" role="tab" data-toggle="tab" id="tabMyProperties" class="lang" as="properties"></a></li>
            <li class="hideme"><a href="#action" role="tab" data-toggle="tab" id="tabAction" class="lang" as="action"></a></li>
        </ul>

        <!-- Tab panes -->
        <div class="tab-content">
            <div class="tab-pane" id="role">
                <div class="row">
                    <b class="icoBtn btnNew" onclick="activityproperty.addPerformer();"></b>
                    <b class="icoBtn btnDel" onclick="activityproperty.delPerformer();"></b>
                    <div id="myPerformerGrid" class="ag-bootstrap" style="width:100%;height:160px;float:left;"></div>
                </div>
            </div>
            <div class="tab-pane" id="gateway">
                <div class="row" style="margin-top:5px;">
                    <div>
                        <p>
                            <span class="a_tit lang" as="gatewaytype"></span>
                            <select id="ddlGatewayType" class="form-control" style="width:340px;">
                                <option value="default" class="lang" as="optiondefault"></option>
                                <option value="Split" class="lang" as="split"></option>
                                <option value="Join" class="lang" as="join"></option>
                            </select>
                        </p>
                    </div>
                    <div>
                        <p>
                            <span class="a_tit lang" as="branchtype"></span>
                            <select id="ddlDirectionType" class="form-control" style="width:340px;">
                                <option value="default" class="lang" as="optiondefault"></option>
                            </select>
                        </p>
                    </div>
                    <div id="divJoinPassType" style="display:none">
                        <p>
                            <span class="a_tit lang" as="passtype"></span>
                            <select id="ddlJoinPassType" class="form-control" style="width:340px;">
                                <option value="default" class="lang" as="optiondefault"></option>
                                <option value="TokenCountPass" class="lang" as="branchcount"></option>
                                <option value="ForcedBranchPass" class="lang" as="branchforced"></option>
                            </select>
                        </p>
                    </div>
                </div>
            </div>
            <div id="sub" class="tab-pane">
                <div class="row" style="margin-top:5px;">
                    <div>
                        <p>
                            <span class="a_tit lang" as="subprocessguid"></span>
                            <span><input type="text" id="txtProcessGUID" class="form-control" style="width:340px;" readonly="readonly" /></span>
                            <span class="a_tit lang" as="subprocessname"></span>
                            <span><input type="text" id="txtProcessName" class="form-control" style="width:340px;" readonly /></span>
                        </p>
                    </div>
                    <div id="mySubProcessGrid" class="ag-bootstrap" style="width:100%;height:200px;float:left;"></div>
                </div>
                <div class="row" style="margin-top:5px;">
                    <span class="lang" as="subprocessdblclick"></span>
                </div>
            </div>
            <div class="tab-pane" id="page">
                <div class="row" style="margin-top:5px;">
                    <p>
                        <span class="a_tit lang" as="pageurl"></span>
                        <span><input type="text" id="txtActivityUrl" class="form-control" style="width:340px;" /></span>
                    </p>
                </div>
            </div>
            <div id="action" class="tab-pane">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#actionBefore" role="tab" data-toggle="tab" class="lang" as="before"></a></li>
                    <li><a href="#actionAfter" role="tab" data-toggle="tab" class="lang" as="after"></a></li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content">
                    <div class="tab-pane active" id="actionBefore">
                        <div class="row" style="margin-top:5px;">
                            <p>
                                <span class="a_tit lang" as="calltype"></span>
                                <select id="ddlActionMethodTypeBefore" class="form-control actionmethodoptions-before" style="width:160px;">
                                    <option value="None" selected class="lang" as="optiondefault"></option>
                                    <option value="LocalMethod" class="lang" as="localmethod"></option>
                                    <option value="WebApi" class="lang" as="webapi"></option>
                                    <option value="SQL" class="lang" as="sqlcommand"></option>
                                    <option value="StoreProcedure" class="lang" as="storeprocedure"></option>
                                    <option value="Python" class="lang" as="pythonscript"></option>
                                </select>
                            </p>
                            <p class="webapioptions-before" id="divWebApiMethodBefore" style="display:none;">
                                <span class="a_tit lang" as="webapimethodtype"></span>
                                <select id="ddlWebApiMethodBefore" class="form-control" style="width:160px;">
                                    <option value="HttpGet">HttpGet</option>
                                    <option value="HttpPost">HttpPost</option>
                                    <option value="HttpPut">HttpPut</option>
                                    <option value="HttpDelete">HttpDelete</option>
                                </select>
                            </p>
                            <p>
                                <span class="a_tit lang" as="argumentslist"></span>
                                <span>
                                    <input type="text" id="txtActionArgumentsBefore" class="form-control" style="width:340px;" placeholder="varA, varB" />
                                </span>
                            </p>
                            <p>
                                <span class="a_tit lang" as="expression"></span>
                                <span>
                                    <textarea rows="3" id="txtActionExpressionBefore" style="width:340px;"></textarea>
                                </span>
                            </p>
                        </div>
                    </div>
                    <div class="tab-pane" id="actionAfter">
                        <div class="row" style="margin-top:5px;">
                            <p>
                                <span class="a_tit lang" as="calltype"></span>
                                <select id="ddlActionMethodTypeAfter" class="form-control actionmethodoptions-after" style="width:160px;">
                                    <option value="None" selected class="lang" as="optiondefault"></option>
                                    <option value="LocalMethod" class="lang" as="localmethod"></option>
                                    <option value="WebApi" class="lang" as="webapi"></option>
                                    <option value="SQL" class="lang" as="sqlcommand"></option>
                                    <option value="StoreProcedure" class="lang" as="storeprocedure"></option>
                                    <option value="Python" class="lang" as="pythonscript"></option>
                                </select>
                            </p>
                            <p class="webapioptions-after"  id="divWebApiMethodAfter" style="display:none;">
                                <span class="a_tit lang" as="webapimethodtype"></span>
                                <select id="ddlWebApiMethodAfter" class="form-control" style="width:160px;">
                                    <option value="HttpGet">HttpGet</option>
                                    <option value="HttpPost">HttpPost</option>
                                    <option value="HttpPut">HttpPut</option>
                                    <option value="HttpDelete">HttpDelete</option>
                                </select>
                            </p>
                            <p>
                                <span class="a_tit lang" as="argumentslist"></span>
                                <span>
                                    <input type="text" id="txtActionArgumentsAfter" class="form-control" style="width:340px;" placeholder="varA, varB" />
                                </span>
                            </p>
                            <p>
                                <span class="a_tit lang" as="expression"></span>
                                <span>
                                    <textarea rows="3" id="txtActionExpressionAfter" style="width:340px;"></textarea>
                                </span>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary lang" as="sure" data-dismiss="modal" onclick="activityproperty.saveActivity();"></button>
            <button class="btn lang" as="cancel" data-dismiss="modal" aria-hidden="true"></button>
        </div>

        <script type="text/javascript">
        $(function () {
            //load activity information
            kresource.localize();
            activityproperty.loadActivity();
        });
        </script>
</body>
</html>